<?php
/**
 * Created by PhpStorm.
 * User: stupboy
 * Date: 2018/4/19
 * Time: 11:17
 * Mail:87658989@qq.com
 */

namespace app\api\exception;


use think\Exception;

class BaseException extends Exception
{
    public $errorCode;
    public $message;
    public $code;

    public function __construct($msg='',$errorCode=0,$code=200,$data=[])
    {
        $this->message   = $msg;
        $this->errorCode = $errorCode;
        $this->code      = $code;
        $this->data      = $data;
    }

    public function getReturnData(){
        return $this->data;
    }
}